//
//  MyStockFundFlow.m
//  Stock
//
//  Created by blacksun on 11-7-3.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#import "MyStockFundFlow.h"


@implementation MyStockFundFlow
@synthesize stockId;
@synthesize f0;
@synthesize fIn0;
@synthesize fOut0;
@synthesize f1;
@synthesize fIn1;
@synthesize fOut1;
@synthesize f2;
@synthesize fIn2;
@synthesize fOut2;
@synthesize f3;
@synthesize fIn3;
@synthesize fOut3;
@synthesize ft;
@synthesize fIn;
@synthesize fOut;
@synthesize turnover;
@synthesize fNet;
@synthesize fsNet;
@synthesize fzNet;
@synthesize fNet3;
@synthesize fNet10;
@synthesize fNet60;

-(void)dealloc{
    [stockId release];
    [f0 release];
    [fIn0 release];
    [fOut0 release];
    [f1 release];
    [fIn1 release];
    [fOut1 release];
    [f2 release];
    [fIn2 release];
    [fOut2 release];
    [f3 release];
    [fIn3 release];
    [fOut3 release];
    [ft release];
    [fIn release];
    [fOut release];
    [turnover release];
    
    [super dealloc];
}
- (void)setValue:(id)value forUndefinedKey:(NSString *)key{
    NSLog(@"key:%@ not found",key);
}
+(MyStockFundFlow *)findByStockId:(NSString *)stockId{
    if (!stockId) {
        NSLog(@"error find by %@",stockId);
        return nil;
    }
    NSString *criteria = [NSString stringWithFormat:@"where stock_id='%@'",stockId];
    return (MyStockFundFlow *)[MyStockFundFlow findFirstByCriteria:criteria];
}

@end
